{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "请输入解压目录E:\\BaiduNetdiskDownload\\Future2018\\test\n",
      "请输入解压完成输出目录E:\\BaiduNetdiskDownload\\Future2018\\test\\out\n",
      "解压完成\n"
     ]
    }
   ],
   "source": [
    "#Python批量解压RAR脚本\n",
    "import os\n",
    "\n",
    "source_dir = input(\"请输入解压目录\")\n",
    "unzip_dir = input(\"请输入解压完成输出目录\")\n",
    " \n",
    "#windows RAR解压缩命令\n",
    "rar_command = '\"C:\\\\Program Files\\\\WinRAR\\\\Rar.exe\" -y x -pwww.jinshuyuan.net %s\\\\*.rar * %s\\\\' \\\n",
    "              % (source_dir, unzip_dir)\n",
    "\n",
    "if os.system(rar_command):\n",
    "    print('解压完成')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
